<template>
  <Icon  v-if="props.icon && props.icon.substring(0,5) === 'icons'" :color="props.color" :icon="props.icon.substring(6)" :width="props.size" />
  <span  v-else class="iconfont" :class="props.icon"></span>
</template>

<script setup lang="ts">
import { Icon } from "@iconify/vue";
const props = defineProps({
  icon: String,
  size: {
    type: Number,
    default: 20
  },
  color:{
    type: [String,Object],
    default: "#a8abb2"
  }
});
</script>

<style scoped></style>
